﻿using Rbac.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rbac.Domain.Interface
{
	public interface IRolePermissionRepository
	{
		/// <summary>
		/// 为角色分配权限
		/// </summary>
		/// <param name="roleId"></param>
		/// <param name="permissionIdList"></param>
		/// <returns></returns>
		int DistributeRolePermissions(int roleId, List<int> permissionIdList);
		/// <summary>
		/// 根据角色获取权限列表
		/// </summary>
		/// <param name="roleId"></param>
		/// <returns></returns>
		List<Permission> GetPermissionsByRoleId(int roleId);
	}
}
